Subject: Re: Dividing hex numbers by 2
From: [email-masked] (Ben Wyatt)
To: [email-masked], [email-masked]
Date: Wed, 26 Feb 92 08:44:50 GMT

Greetings Keith, you wrote some text on the subject Re: Dividing hex
numbers by 2, and now I'm going to answer it

> > But if the number was, for example, $7B3, it gives a silly answer.
> 
> $7b3	= 1971
> 1971/2	= 985.5  (985 as integer)
> 985	= $3D9
> 
> Amos says: $7b3 / 2 = $3d9
> 
> ...are you SURE about this ??

No, this isn't what I want. I admit, I didn't think it through when I said
it gave silly answers - the answers are, of course, completely correct,
but not the answers I want! :) See below for what I want.

> > Has anyone got a quick and easy solution to this, without having to read
> > each character and divide it manually?
> 
> Please give lots of examples where it goes wrong, and I'll try and help. 
> Either that, or your copy may need re-installing or something horrible like
> that. 

My AMOS works fine for dividing hex numbers, as you describe, but I only
want to divide each digit of the hex number. This is for the screen colours
and I want to calculate the half-brite colour. Colour(>31) doesn't work.

Anyway, for this purpose I use extension commands which are able to read
colours 32-63 correctly (ie half the colour of their equivilant).

Bye _________________________________
   /                                 \
   > Ben Wyatt - [email-masked] <
   \_________________________________/ (c)1995 Very Interesting Signatures